package com.coincalf.feign.hystrix;

import com.coincalf.dto.CoinDTO;
import com.coincalf.dto.CoinInfoDto;
import com.coincalf.feign.CoinServiceClient;
import com.esotericsoftware.minlog.Log;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class CoinServiceClientFallback implements CoinServiceClient {

    @Override
    public List<CoinDTO> selectCoinInfo() {
        return new ArrayList<>();
    }

    @Override
    public List<CoinDTO> selectForexCoin() {
        return new ArrayList<>();
    }

    @Override
    public String selectRpcServerUrl(String coinName) {
        return "ERROR";
    }

    @Override
    public CoinInfoDto selectCoinInfo(String coinName) {
        return null;
    }

    @Override
    public List<CoinInfoDto> selectAllMainCoin() {
        return new ArrayList<>();
    }

    @Override
    public List<CoinInfoDto> selectCoinInfoByMainCoinId(Long coinId) {
        Log.warn("获取合约地址链路异常......");
        return new ArrayList<>();
    }

    @Override
    public Long selectMainCoinIdByCoinId(Long coinId) {
        return null;
    }

}
